﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MediaGarden.Playlists.Services;
using System.Web.Mvc;

namespace MediaGarden.Playlists.Formats
{
    public class JsonPlaylistWriter : IPlaylistWriter
    {
        public string WriterName
        {
            get { return "Json"; }
        }

        public System.Web.Mvc.ActionResult WriteMvcResult(System.Web.Mvc.ControllerBase controller, PlaylistContext context)
        {
            // TODO: Set other values of JsonResult (e.g. content type set based on playlist format)
            return new JsonResult() { Data = context.Playlist };
        }
    }
}